# coding: utf-8
# @Author: cyl
# @File: allure_handler.py
# @Time: 2024/09/25 21:58:35
import allure
import pytest


def test_attach_text():
    allure.attach("这是一个纯文本...", attachment_type=allure.attachment_type.TEXT)

def test_attach_html():
    allure.attach("<body>这是一段html body块</body>", 'html测试块', attachment_type=allure.attachment_type.HTML)

# 调用图片要使用file方法
def test_attach_photo(path: str, name: str):
    allure.attach.file(
        path,
        name=name,
        attachment_type=allure.attachment_type.PNG
    )
